package com.snow.storeapi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.snow.storeapi.entity.Disease;
import com.snow.storeapi.mapper.DiseaseMapper;
import com.snow.storeapi.service.IDiseaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DiseaseServiceImpl extends ServiceImpl<DiseaseMapper, Disease> implements IDiseaseService {

    @Autowired
    private DiseaseMapper diseaseMapper;

    @Override
    public List<Disease> selectByPage(String diseaseName) {
        return diseaseMapper.selectByPage("%" + diseaseName + "%");
    }

    @Override
    public List<Disease> topTen() {
        return diseaseMapper.topTen();
    }
}
